package controller;

import java.awt.Point;

import view.GeometryDescriptor;

public class DragObjSt extends State 
{

	public DragObjSt(DrawingController controller) 
	{
		super(controller);
	}

	@Override
	public void update(Input input, InputMod mod, Point p) 
	{
		if (input == Input.MU && mod == InputMod.LU)
			updateMU_LU(p);
		else if (input == Input.MM && mod == InputMod.LD)
			updateMM_LD(p);
	}

	private void updateMM_LD(Point p) 
	{
		if (this.controller.getView().moved3())
			this.controller.dragSelectedObject(p);
	}

	private void updateMU_LU(Point p) 
	{
		this.controller.setState(new SelectSt(this.controller));
	}

	@Override
	public void update(Input input, InputMod mod, char letter)
	{
		
	}

}
